cargo.git
8 years agoExtract clean_benches function
Aleksey Kladov [Sat, 8 Jul 2017 21:30:38 +0000 (00:30 +0300)]
Extract clean_benches function

8 years agoExtract clean_tests function
Aleksey Kladov [Sat, 8 Jul 2017 21:10:04 +0000 (00:10 +0300)]
Extract clean_tests function

8 years agoExtract clean_examples function
Aleksey Kladov [Sat, 8 Jul 2017 20:53:09 +0000 (23:53 +0300)]
Extract clean_examples function

8 years agoExtract clean_bins function
Aleksey Kladov [Sat, 8 Jul 2017 20:19:31 +0000 (23:19 +0300)]
Extract clean_bins function

8 years agoExtract clean_library function
Aleksey Kladov [Sat, 8 Jul 2017 19:51:42 +0000 (22:51 +0300)]
Extract clean_library function

8 years agoDon't store root in the layout
Aleksey Kladov [Sat, 8 Jul 2017 18:35:52 +0000 (21:35 +0300)]
Don't store root in the layout

8 years agoUnify naming for `package_root`
Aleksey Kladov [Sat, 8 Jul 2017 18:46:06 +0000 (21:46 +0300)]
Unify naming for `package_root`

8 years agoSuperfluous pub
Aleksey Kladov [Sat, 8 Jul 2017 16:48:46 +0000 (19:48 +0300)]
Superfluous pub

8 years agoRestructure code
Aleksey Kladov [Sat, 8 Jul 2017 16:45:07 +0000 (19:45 +0300)]
Restructure code

8 years agoMake layout private to targets
Aleksey Kladov [Sat, 8 Jul 2017 16:11:36 +0000 (19:11 +0300)]
Make layout private to targets

8 years agoMove code for inferring build targets to a separate file
Aleksey Kladov [Sat, 8 Jul 2017 16:00:31 +0000 (19:00 +0300)]
Move code for inferring build targets to a separate file

8 years agoFix typo
Aleksey Kladov [Sun, 2 Jul 2017 09:17:26 +0000 (12:17 +0300)]
Fix typo

8 years agoRefactor: virtual manifest does not need layout
Aleksey Kladov [Sun, 2 Jul 2017 09:08:49 +0000 (12:08 +0300)]
Refactor: virtual manifest does not need layout

8 years agoSimplify
Aleksey Kladov [Sun, 2 Jul 2017 08:32:48 +0000 (11:32 +0300)]
Simplify

8 years agoSimplify
Aleksey Kladov [Sun, 2 Jul 2017 08:24:55 +0000 (11:24 +0300)]
Simplify

8 years agoMake `Layout` a private implementation detail of toml
Aleksey Kladov [Sun, 2 Jul 2017 08:01:25 +0000 (11:01 +0300)]
Make `Layout` a private implementation detail of toml

8 years agoAuto merge of #4257 - alexcrichton:update, r=alexcrichton
bors [Fri, 7 Jul 2017 21:21:06 +0000 (21:21 +0000)]
Auto merge of #4257 - alexcrichton:update, r=alexcrichton

Update dependencies with semver-compat version

Just a standard update

8 years agoUpdate dependencies with semver-compat version
Alex Crichton [Fri, 7 Jul 2017 21:01:40 +0000 (14:01 -0700)]
Update dependencies with semver-compat version

Just a standard update

8 years agoAuto merge of #4248 - dethoter:issue-4228, r=alexcrichton
bors [Wed, 5 Jul 2017 14:19:07 +0000 (14:19 +0000)]
Auto merge of #4248 - dethoter:issue-4228, r=alexcrichton

bench command supports --no-fail-fast flag.

Fix for #4228.

8 years agoAuto merge of #4249 - tmccombs:zsh-test-update, r=alexcrichton
bors [Wed, 5 Jul 2017 13:58:20 +0000 (13:58 +0000)]
Auto merge of #4249 - tmccombs:zsh-test-update, r=alexcrichton

Add more options for cargo test zsh completion

8 years agoAdd more options for cargo test zsh completion
Thayne McCombs [Wed, 5 Jul 2017 07:19:58 +0000 (01:19 -0600)]
Add more options for cargo test zsh completion

8 years agobench command supports --no-fail-fast flag.
Evgen Druzhynin [Tue, 4 Jul 2017 16:48:28 +0000 (19:48 +0300)]
bench command supports --no-fail-fast flag.

8 years agoAuto merge of #4246 - est31:master, r=Mark-Simulacrum
bors [Sun, 2 Jul 2017 13:44:07 +0000 (13:44 +0000)]
Auto merge of #4246 - est31:master, r=Mark-Simulacrum

Let two further tests tolerate col info in panics

Needed by https://github.com/rust-lang/rust/pull/42938

I've now ripgrepped for "panicked at" and found no further
test that hardcodes the "filename:line$" format.

8 years agoLet two further tests tolerate col info in panics
est31 [Sun, 2 Jul 2017 13:38:29 +0000 (15:38 +0200)]
Let two further tests tolerate col info in panics

Needed by https://github.com/rust-lang/rust/pull/42938

I've now ripgrepped for "panicked at" and found no further
test that hardcodes the "filename:line$" format.

8 years agoAuto merge of #4244 - est31:master, r=matklad
bors [Sun, 2 Jul 2017 11:08:30 +0000 (11:08 +0000)]
Auto merge of #4244 - est31:master, r=matklad

Let the cargo_bench_failing_test tolerate col info

Needed by https://github.com/rust-lang/rust/pull/42938

8 years agoLet the cargo_bench_failing_test tolerate col info
est31 [Sun, 2 Jul 2017 11:04:16 +0000 (13:04 +0200)]
Let the cargo_bench_failing_test tolerate col info

Needed by https://github.com/rust-lang/rust/pull/42938

8 years agoAuto merge of #4239 - Keruspe:master, r=alexcrichton
bors [Fri, 30 Jun 2017 05:49:34 +0000 (05:49 +0000)]
Auto merge of #4239 - Keruspe:master, r=alexcrichton

hash '__CARGO_DEFAULT_LIB_METADATA' in metadata for rustc

We already have __CARGO_DEFAULT_LIB_METADATA to force adding the hash of some metadata in the libraries file name when building rust.
For now, we only check if it is set or not.
This patch makes also use of its value to compute the hash. This way we'll be able to pass in the channel we're building to avoid hash collisions between channels.

8 years agoAuto merge of #4214 - msehnout:master, r=matklad
bors [Fri, 30 Jun 2017 05:29:30 +0000 (05:29 +0000)]
Auto merge of #4214 - msehnout:master, r=matklad

Infer multi-file binaries like `src/bin/server/main.rs` by convention

This feature is described in issue #4086

8 years agoAuto merge of #4238 - ashleygwilliams:policies, r=steveklabnik
bors [Thu, 29 Jun 2017 18:31:16 +0000 (18:31 +0000)]
Auto merge of #4238 - ashleygwilliams:policies, r=steveklabnik

updates to policies

based on convo with @withoutboats and @carols10cents

8 years agohash '__CARGO_DEFAULT_LIB_METADATA' in metadata for rustc
Marc-Antoine Perennou [Thu, 15 Jun 2017 14:48:05 +0000 (16:48 +0200)]
hash '__CARGO_DEFAULT_LIB_METADATA' in metadata for rustc

This will let us seed the release channel as part of the
metadata used for the hash to avoid conflicting hashes across
channels.

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
8 years agoAdd documentation for multi-file binary convention
Martin Sehnoutka [Thu, 29 Jun 2017 07:53:57 +0000 (09:53 +0200)]
Add documentation for multi-file binary convention

8 years agoPrevent unnecessary heap allocations and simplify condition
Martin Sehnoutka [Thu, 29 Jun 2017 07:52:40 +0000 (09:52 +0200)]
Prevent unnecessary heap allocations and simplify condition

8 years agoAuto merge of #4234 - michaelwoerister:smarter-cargo-incremental-2, r=alexcrichton
bors [Thu, 29 Jun 2017 01:01:27 +0000 (01:01 +0000)]
Auto merge of #4234 - michaelwoerister:smarter-cargo-incremental-2, r=alexcrichton

Set -Ccodegen-units=N for non-path dependencies when CARGO_INCREMENTAL is set.

This PR tweaks compilation for non-path dependencies when CARGO_INCREMENTAL is set. Before, `cargo` would compile such dependencies "just" non-incrementally while, with this PR, it will also set the number of CGUs to the number of CPU cores. Otherwise compiling those dependencies might take significantly longer (because of more expensive optimizations and less multi-threading) than compiling them incrementally -- which is what we wanted to avoid in the first place.

8 years agofeat(policy): add information on security disclosures
Ashley Williams [Thu, 29 Jun 2017 00:16:00 +0000 (20:16 -0400)]
feat(policy): add information on security disclosures

8 years agofix(doc): clarify the content the code of conduct covers
Ashley Williams [Thu, 29 Jun 2017 00:10:36 +0000 (20:10 -0400)]
fix(doc): clarify the content the code of conduct covers

8 years ago"main" can be valid name for binary again, improve test
Martin Sehnoutka [Wed, 28 Jun 2017 12:02:25 +0000 (14:02 +0200)]
"main" can be valid name for binary again, improve test

8 years agoAuto merge of #4229 - azerupi:install-version-range, r=matklad
bors [Wed, 28 Jun 2017 06:39:50 +0000 (06:39 +0000)]
Auto merge of #4229 - azerupi:install-version-range, r=matklad

Implement semver ranges for install --vers

This implements the design discussed in #4207
It allows to specify semver ranges on `cargo install ... --vers`

1. The first character of the `--vers` value is checked, if there is none we return an error.
2. If it is one of `<`, `>`, `=`, `^`, `~` we parse the value as a `VersionReq`, otherwise we parse it as a `Version`.
3. If the parsing as a `Version` fails but parsing as `VersionReq` succeeds, we add a note to the warning mentioning that a qualifier should be used to specify a semver range. This catches versions with less than tree digits.

Otherwise, the previous behaviour is preserved with the warning of backwards compatibility.

This means that

- `cargo install ... --vers "^1.2.3"` will be parsed as a range
- `cargo install ... --vers 1.2.3` will be parsed as a version
- `cargo install ... --vers 1.2` will be parsed as a version for backwards compatibility reasons, fail and be passed through as is,**but** we will add a note `if you want to specify semver range, add an explicit qualifier, like ^1.2`
- `cargo install ... --vers blah` will be parsed as a version for backwards compatibility reasons (which is weird because it is not even a valid semver range) and produce an `unknown error` down the line. I have left this behaviour untouched because it worked like that before, but I can easily make it error sooner with a better message.

8 years agoSet -Ccodegen-units=N for non-path dependencies when CARGO_INCREMENTAL is set.
Michael Woerister [Tue, 27 Jun 2017 22:25:07 +0000 (15:25 -0700)]
Set -Ccodegen-units=N for non-path dependencies when CARGO_INCREMENTAL is set.

8 years agoInfer paths as well as names for binaries
Sehny [Tue, 27 Jun 2017 17:51:56 +0000 (19:51 +0200)]
Infer paths as well as names for binaries

8 years agoRemove extra blank lines and commas on last match arm for consistency
Mathieu David [Tue, 27 Jun 2017 10:23:44 +0000 (12:23 +0200)]
Remove extra blank lines and commas on last match arm for consistency

8 years agoAuto merge of #4230 - Mark-Simulacrum:double-print, r=alexcrichton
bors [Tue, 27 Jun 2017 00:42:29 +0000 (00:42 +0000)]
Auto merge of #4230 - Mark-Simulacrum:double-print, r=alexcrichton

Prevent rustc stderr/stdout from being duplicated.

Please review carefully. I've not submitted patches to Cargo before, I think, so this may be flawed in some way I haven't detected yet. Tests are green locally, though.

Fixes #4223

8 years agoPrevent rustc stderr/stdout from being duplicated.
Mark Simulacrum [Mon, 26 Jun 2017 23:07:36 +0000 (17:07 -0600)]
Prevent rustc stderr/stdout from being duplicated.

8 years agoAuto merge of #4227 - YaLTeR:version-field-fix, r=alexcrichton
bors [Mon, 26 Jun 2017 20:47:52 +0000 (20:47 +0000)]
Auto merge of #4227 - YaLTeR:version-field-fix, r=alexcrichton

Clarify how breaking changes should be handled before 1.0.0

Resolves #4064

8 years agoImplement semver ranges for install --vers
Mathieu David [Mon, 26 Jun 2017 20:44:13 +0000 (22:44 +0200)]
Implement semver ranges for install --vers

8 years agoClarify how breaking changes should be handled before 1.0.0
Ivan Molodetskikh [Mon, 26 Jun 2017 11:05:20 +0000 (14:05 +0300)]
Clarify how breaking changes should be handled before 1.0.0

8 years agoAuto merge of #4218 - alexcrichton:fix-flaky, r=alexcrichton
bors [Sun, 25 Jun 2017 05:44:31 +0000 (05:44 +0000)]
Auto merge of #4218 - alexcrichton:fix-flaky, r=alexcrichton

Ignore a test that accesses crates.io for now

Tests in general shouldn't hit the network, but this one requires a crate from
crates.io :(

8 years agoIgnore a test that accesses crates.io for now
Alex Crichton [Sun, 25 Jun 2017 05:43:45 +0000 (22:43 -0700)]
Ignore a test that accesses crates.io for now

Tests in general shouldn't hit the network, but this one requires a crate from
crates.io :(

8 years agoAuto merge of #4209 - natboehm:add-index-flag, r=alexcrichton
bors [Sat, 24 Jun 2017 04:24:55 +0000 (04:24 +0000)]
Auto merge of #4209 - natboehm:add-index-flag, r=alexcrichton

Replace `cargo publish --host` with `cargo publish --index`

This change makes the command consistent with other versions with the same flag. `cargo publish --host` is still supported, currently marked as deprecated, or for reuse as mentioned in issue #4208.

Fixes #3797

8 years agoAuto merge of #4215 - alexcrichton:search-stdout, r=matklad
bors [Fri, 23 Jun 2017 22:41:47 +0000 (22:41 +0000)]
Auto merge of #4215 - alexcrichton:search-stdout, r=matklad

Switch `cargo search` output to stdout

Closes #4203

8 years agoSwitch `cargo search` output to stdout
Alex Crichton [Fri, 23 Jun 2017 15:45:12 +0000 (08:45 -0700)]
Switch `cargo search` output to stdout

Closes #4203

8 years agoInfer multi-file binaries like `src/bin/server/main.rs` by convention
Martin Sehnoutka [Fri, 23 Jun 2017 15:37:26 +0000 (17:37 +0200)]
Infer multi-file binaries like `src/bin/server/main.rs` by convention

8 years agoAdded comments indicating which parts should be removed at appropriate time
Natalie Boehm [Thu, 22 Jun 2017 20:34:57 +0000 (16:34 -0400)]
Added comments indicating which parts should be removed at appropriate time

8 years agoAdd test for if user ever decides to use both --index and --host
Natalie Boehm [Thu, 22 Jun 2017 19:47:07 +0000 (15:47 -0400)]
Add test for if user ever decides to use both --index and --host

8 years agoreplace instances of flag --host with --index in publish, still supports --host howev...
Natalie Boehm [Thu, 22 Jun 2017 19:32:30 +0000 (15:32 -0400)]
replace instances of flag --host with --index in publish, still supports --host however deprecation warning is issued

8 years agoAuto merge of #4201 - alexcrichton:more-human, r=matklad
bors [Wed, 21 Jun 2017 18:26:14 +0000 (18:26 +0000)]
Auto merge of #4201 - alexcrichton:more-human, r=matklad

Flag crate registry errors as "human"

They often contain useful information!

Closes #4200

8 years agoAuto merge of #4202 - dethoter:issue-4199, r=alexcrichton
bors [Wed, 21 Jun 2017 17:49:38 +0000 (17:49 +0000)]
Auto merge of #4202 - dethoter:issue-4199, r=alexcrichton

Fix an incorrect merge of credentials. Add a new test for that.

Fix for #4199.

8 years agoFix an incorrect merge of credentials. Add a new test for that.
Evgen Druzhynin [Wed, 21 Jun 2017 16:48:40 +0000 (19:48 +0300)]
Fix an incorrect merge of credentials. Add a new test for that.

8 years agoFlag crate registry errors as "human"
Alex Crichton [Wed, 21 Jun 2017 15:11:08 +0000 (08:11 -0700)]
Flag crate registry errors as "human"

They often contain useful information!

Closes #4200

8 years agoAuto merge of #4196 - gilescope:multiline_assert, r=alexcrichton
bors [Wed, 21 Jun 2017 14:04:55 +0000 (14:04 +0000)]
Auto merge of #4196 - gilescope:multiline_assert, r=alexcrichton

Multiline assert

Found a second location where multiline assert_eq failure breaks a test.
This is an extention of #4181.

8 years agoAuto merge of #4180 - pnkfelix:issue-4135, r=alexcrichton
bors [Wed, 21 Jun 2017 12:11:25 +0000 (12:11 +0000)]
Auto merge of #4180 - pnkfelix:issue-4135, r=alexcrichton

Issue 4135: include = [...] should override git file list

Fix #4135: if theres `include = [...]`, then do not prepopulate file list via git.

8 years agoMerge branch 'master' into multiline_assert
Squirrel [Wed, 21 Jun 2017 10:15:17 +0000 (11:15 +0100)]
Merge branch 'master' into multiline_assert

8 years agoRegression test for issue #4135.
Felix S. Klock II [Fri, 16 Jun 2017 15:54:59 +0000 (17:54 +0200)]
Regression test for issue #4135.

8 years agoPrep for asser_eq failure msg format change.
Giles Cope [Tue, 20 Jun 2017 22:14:15 +0000 (23:14 +0100)]
Prep for asser_eq failure msg format change.

8 years agoAuto merge of #4190 - alexcrichton:wincosole-fix, r=alexcrichton
bors [Mon, 19 Jun 2017 17:43:46 +0000 (17:43 +0000)]
Auto merge of #4190 - alexcrichton:wincosole-fix, r=alexcrichton

Update wincolor

Helps mitigate #4189

8 years agoUpdate wincolor
Alex Crichton [Mon, 19 Jun 2017 17:42:58 +0000 (10:42 -0700)]
Update wincolor

Helps mitigate #4189

8 years agoAuto merge of #4181 - gilescope:patch-1, r=alexcrichton
bors [Mon, 19 Jun 2017 14:09:30 +0000 (14:09 +0000)]
Auto merge of #4181 - gilescope:patch-1, r=alexcrichton

Make test less brittle prior to assert_eq failure message format change

PR required for rust-lang/rust#42541 to make assert_eq error message be multi-line. Before implementing this we need to make the current test less brittle.
Not 100% clear on if I need the final [...] or not.

8 years agoFixing test failure
Squirrel [Sun, 18 Jun 2017 21:03:06 +0000 (22:03 +0100)]
Fixing test failure

8 years agoAuto merge of #4182 - matklad:simplify, r=alexcrichton
bors [Sat, 17 Jun 2017 19:14:50 +0000 (19:14 +0000)]
Auto merge of #4182 - matklad:simplify, r=alexcrichton

Simplify inferred binary names

Fix for https://github.com/rust-lang/rust/issues/42365, which probably breaks other stuff :(

8 years agoAuto merge of #4185 - ids1024:typo, r=Mark-Simulacrum
bors [Sat, 17 Jun 2017 18:22:04 +0000 (18:22 +0000)]
Auto merge of #4185 - ids1024:typo, r=Mark-Simulacrum

Fix typo in comment

8 years agoFix typo in comment
Ian Douglas Scott [Sat, 17 Jun 2017 17:35:20 +0000 (10:35 -0700)]
Fix typo in comment

8 years agoFix test on windows
Aleksey Kladov [Sat, 17 Jun 2017 15:43:05 +0000 (18:43 +0300)]
Fix test on windows

Backslashes here are escaped (\\), so [/] does not really help :(

8 years agoAuto merge of #4178 - nrc:shell, r=alexcrichton
bors [Sat, 17 Jun 2017 06:10:23 +0000 (06:10 +0000)]
Auto merge of #4178 - nrc:shell, r=alexcrichton

Support having a generic writer instead of a termcolor StandardStream

This is requied by the RLS (and presumably any other client who wants to use Cargo as a lib and redirect output)

r? @alexcrichton

8 years agoSupport having a generic writer instead of a termcolor StandardStream
Nick Cameron [Fri, 16 Jun 2017 02:57:27 +0000 (14:57 +1200)]
Support having a generic writer instead of a termcolor StandardStream

This is requied by the RLS (and presumably any other client who wants to use Cargo as a lib and redirect output)

8 years agoDon't search bins in src if there's a library
Aleksey Kladov [Fri, 16 Jun 2017 20:38:54 +0000 (23:38 +0300)]
Don't search bins in src if there's a library

Ideally we want not to search for binaries there in any case, but that's
probably not gonna happen due to backwards comparability.

8 years agoSimplify inferred binary names
Aleksey Kladov [Fri, 16 Jun 2017 19:41:27 +0000 (22:41 +0300)]
Simplify inferred binary names

8 years agoMake test less brittle prior to assert_eq failure message format change
Squirrel [Fri, 16 Jun 2017 18:20:41 +0000 (19:20 +0100)]
Make test less brittle prior to assert_eq failure message format change

PR #42541 on Rust is to make assert_eq error message be multi-line. Before implementing this we need to make the current test less brittle.

8 years agoFix #4135: if theres `include = [...]`, then dont prepopulate filelist via git
Felix S. Klock II [Fri, 16 Jun 2017 15:54:44 +0000 (17:54 +0200)]
Fix #4135: if theres `include = [...]`, then dont prepopulate filelist via git

8 years agoFactor search for sibling Cargo.toml and .git folder into separate subroutine.
Felix S. Klock II [Thu, 8 Jun 2017 10:39:28 +0000 (12:39 +0200)]
Factor search for sibling Cargo.toml and .git folder into separate subroutine.

8 years agoassert_eq failure message now multi-line related to rust pull request 42541.
Giles Cope [Fri, 16 Jun 2017 07:40:05 +0000 (08:40 +0100)]
assert_eq failure message now multi-line related to rust pull request 42541.

8 years agoAuto merge of #4125 - alexcrichton:rerun-if-env-changed, r=matklad
bors [Thu, 15 Jun 2017 17:52:42 +0000 (17:52 +0000)]
Auto merge of #4125 - alexcrichton:rerun-if-env-changed, r=matklad

Implement `cargo:rerun-if-env-changed=FOO`

This commit implements a new method of rerunning a build script if an
environment variable changes. Environment variables are one of the primary
methods of giving inputs to a build script today, and this'll help situations
where if you change an env var you don't have to remember to clean out an old
build directory to ensure fresh results.

Closes #2776

8 years agoAuto merge of #4176 - alexcrichton:atty, r=matklad
bors [Thu, 15 Jun 2017 16:17:29 +0000 (16:17 +0000)]
Auto merge of #4176 - alexcrichton:atty, r=matklad

Use the `atty` crate for TTY detection

This is more robust in the face of msys terminals and otherwise helps share more
dependencies!

Closes #4166

8 years agoUse the `atty` crate for TTY detection
Alex Crichton [Thu, 15 Jun 2017 15:08:35 +0000 (08:08 -0700)]
Use the `atty` crate for TTY detection

This is more robust in the face of msys terminals and otherwise helps share more
dependencies!

Closes #4166

8 years agoImplement `cargo:rerun-if-env-changed=FOO`
Alex Crichton [Mon, 5 Jun 2017 14:52:31 +0000 (07:52 -0700)]
Implement `cargo:rerun-if-env-changed=FOO`

This commit implements a new method of rerunning a build script if an
environment variable changes. Environment variables are one of the primary
methods of giving inputs to a build script today, and this'll help situations
where if you change an env var you don't have to remember to clean out an old
build directory to ensure fresh results.

Closes #2776

8 years agoAuto merge of #4167 - alexcrichton:keep-metadata, r=matklad
bors [Wed, 14 Jun 2017 19:40:34 +0000 (19:40 +0000)]
Auto merge of #4167 - alexcrichton:keep-metadata, r=matklad

Preserve `package.metadata` when packaging

Now that we use Serde this is actually trivial to implement!

Closes #4142

8 years agoAuto merge of #4168 - alexcrichton:more-metadata, r=alexcrichton
bors [Wed, 14 Jun 2017 18:19:17 +0000 (18:19 +0000)]
Auto merge of #4168 - alexcrichton:more-metadata, r=alexcrichton

Hash `Kind` in metadata for crates

This fixes what is now a bug in Cargo discovered when attempting to land
rust-lang/rust#42495 where Cargo will compile both host and target artifacts
with the same `-C metadata` flag. This means that the compile can load two
crates with the same SVH that are supposed to be distinct, which causes weird
bugs with crate loading and whatnot.

This commit throws in the `Kind` into the metadata calculation to resolve this
to ensure that host/target artifacts always have a different `-C metadata`

8 years agoHash `Kind` in metadata for crates
Alex Crichton [Wed, 14 Jun 2017 18:16:24 +0000 (11:16 -0700)]
Hash `Kind` in metadata for crates

This fixes what is now a bug in Cargo discovered when attempting to land
rust-lang/rust#42495 where Cargo will compile both host and target artifacts
with the same `-C metadata` flag. This means that the compile can load two
crates with the same SVH that are supposed to be distinct, which causes weird
bugs with crate loading and whatnot.

This commit throws in the `Kind` into the metadata calculation to resolve this
to ensure that host/target artifacts always have a different `-C metadata`

8 years agoPreserve `package.metadata` when packaging
Alex Crichton [Wed, 14 Jun 2017 14:56:40 +0000 (07:56 -0700)]
Preserve `package.metadata` when packaging

Now that we use Serde this is actually trivial to implement!

Closes #4142

8 years agoAuto merge of #4162 - alexcrichton:termcolor, r=matklad
bors [Wed, 14 Jun 2017 09:57:12 +0000 (09:57 +0000)]
Auto merge of #4162 - alexcrichton:termcolor, r=matklad

Migrate from the `term` crate to `termcolor`

The API of `termcolor` fits what the system gives us much more nicely and should
be well battle-tested from ripgrep. Additionally we don't really need huge
terminfo parsers, that wasn't every really the intention of the color support
here.

8 years agoAuto merge of #4155 - ketralnis:fossil, r=alexcrichton
bors [Wed, 14 Jun 2017 03:33:46 +0000 (03:33 +0000)]
Auto merge of #4155 - ketralnis:fossil, r=alexcrichton

Add fossil VCS support to `cargo new`

Fossil is a simple, high-reliability, distributed software configuration management system <https://www.fossil-scm.org/>

I mostly followed https://github.com/rust-lang/cargo/pull/3842 as a template. Like that one, this only adds support for `cargo new`, not for pulling down fossil-hosted dependencies

A problem that i didn't tackle but I'd be willing to is a little more more `trait`ifying of the VCSs. I would need some guidance on that since it looks like git has some more thorough support than e.g. hg does but it looks pretty doable

8 years agoAuto merge of #4159 - matklad:arch, r=alexcrichton
bors [Wed, 14 Jun 2017 03:01:33 +0000 (03:01 +0000)]
Auto merge of #4159 - matklad:arch, r=alexcrichton

Blurb about Cargo inner workings

Hi!

At today's dev tools meetings we've discussed how we can foster contributions to rust dev tools, and I've complained that some tools are difficult to contribute to because it's difficult to learn how they work because there are no docs, and some other people complained that Cargo is difficult to contribute to because it is rather complex. And, as a member of Cargo team, I thought that I am probably responsible for fixing that :)

So, here's my take at making it easier to dive in into Cargo! I've written a small birds eye overview of the current architecture of Cargo (more like a list of things to look at while reading the code actually :)

In general, I am skeptical about documenting internals of binaries (docs will become obsolete, and very fast), but such a high level picture should be pretty robust (I deliberately avoided linking to the actual source code), and so pretty low-effort to maintain. We do something similar for IntelliJ Rust: https://github.com/intellij-rust/intellij-rust/blob/master/ARCHITECTURE.md as well.

r? @alexcrichton

8 years agoAuto merge of #4158 - stepancheg:hg-ignore, r=alexcrichton
bors [Wed, 14 Jun 2017 02:41:12 +0000 (02:41 +0000)]
Auto merge of #4158 - stepancheg:hg-ignore, r=alexcrichton

Generate .hgignore with syntax:glob

Fixes #4005

8 years agoMigrate from the `term` crate to `termcolor`
Alex Crichton [Thu, 8 Jun 2017 22:09:04 +0000 (15:09 -0700)]
Migrate from the `term` crate to `termcolor`

The API of `termcolor` fits what the system gives us much more nicely and should
be well battle-tested from ripgrep. Additionally we don't really need huge
terminfo parsers, that wasn't every really the intention of the color support
here.

8 years agoAuto merge of #4149 - ordian:master, r=alexcrichton
bors [Tue, 13 Jun 2017 19:53:41 +0000 (19:53 +0000)]
Auto merge of #4149 - ordian:master, r=alexcrichton

Drop rustc-serialize dependency

Fixes #3944.

8 years agoAuto merge of #3978 - dethoter:separated-credentials, r=alexcrichton
bors [Tue, 13 Jun 2017 19:18:49 +0000 (19:18 +0000)]
Auto merge of #3978 - dethoter:separated-credentials, r=alexcrichton

Move API token into the separate file.

Fix of #3748. BTW, it's not clear what to do with old config.
Should I add a check for old config and try to remove [repository.token] field from it every time user add a new token?
Or should I just prefer to use a token field from a new config over the old one?

8 years agoFix typos and reword slightly
Aleksey Kladov [Tue, 13 Jun 2017 18:40:58 +0000 (21:40 +0300)]
Fix typos and reword slightly

8 years agoAuto merge of #4163 - alexcrichton:update, r=alexcrichton
bors [Tue, 13 Jun 2017 17:40:00 +0000 (17:40 +0000)]
Auto merge of #4163 - alexcrichton:update, r=alexcrichton

Update dependencies

Brings in a few fixes for Windows-related dependencies

8 years agoUpdate dependencies
Alex Crichton [Tue, 13 Jun 2017 17:39:01 +0000 (10:39 -0700)]
Update dependencies

Brings in a few fixes for Windows-related dependencies

8 years agoBlurb about Cargo inner workings
Aleksey Kladov [Mon, 12 Jun 2017 22:24:50 +0000 (01:24 +0300)]
Blurb about Cargo inner workings

8 years agoGenerate .hgignore with syntax:glob
Stepan Koltsov [Sun, 11 Jun 2017 04:23:46 +0000 (07:23 +0300)]
Generate .hgignore with syntax:glob

Fixes #4005

8 years agoAdd fossil VCS support to `cargo new`
David King [Sat, 10 Jun 2017 00:51:56 +0000 (17:51 -0700)]
Add fossil VCS support to `cargo new`

Fossil is a simple, high-reliability, distributed software configuration
management system <https://www.fossil-scm.org/>